const joi = require("joi");

// 定义name alias id验证规则
const name = joi.string().required();
const alias = joi.string().alphanum().required();
const id = joi.number().integer().min(1).required();

exports.artCateSchema = {
  body: {
    name,
    alias,
  },
};

exports.deleteArtCateByIdSchema = {
  params: {
    id,
  },
};

exports.getArtCateByIdschema = {
  params: {
    id,
  },
};

exports.updateCateSchema = {
  body: {
    id,
    name,
    alias,
  },
};
